/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package GameClass;

import Game.ShootBalloon;
import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Image;

/**
 *
 * @author THINH
 */
public class WinScreen extends Canvas{
     private ShootBalloon ownmidlet;
    private  Image imutable = null;
    private int index =0;
    private static final int MAX_INDEX = 2;
    public WinScreen(ShootBalloon midlet)
    {
        //Init menu
        ownmidlet = midlet;
        this.setFullScreenMode(true);
        try{
            imutable = Image.createImage("/resource/screen/WinScreen.png");
        }
        catch(Exception e)
        {
            
        }
    }
    
    
    public void paint(Graphics g)
    {
        //update image
       
        g.setColor(255,255,255);
        g.fillRect(0, 0, getWidth(), getHeight());
        g.drawImage(imutable, 0, 0, 0);
      
        
    }
    
    public void keyPressed(int keyCode)
    {
        
        int code = getGameAction(keyCode);
        
        if(code == FIRE){
            ownmidlet.setCurrent(ownmidlet.getMainMenuScreen());            
        }
    }
}
